var express = require("express")
var router = express.Router()
var QcloudSms = require("qcloudsms_js")
var connection = require("../../../db/sql")
var jwt = require("jsonwebtoken")
var shopList = require("./shopListSql")
// var upload = require("./upload.js")
// var shopupload = require("./shopupload.js")
const bcrypt = require("bcryptjs")

const multer = require("multer")

/*左侧数据*/
/* GET home page. */
router.get("/api/shopList/leftdata", function (req, res, next) {
  // connection.query(shopList.selectLeftData(), function (err, resluts) {
  //   if (err) {
  //     res.send({
  //       status: 406,
  //       msg: err,
  //     })
  //   }
  //   res.send({
  //     status: 200,
  //     data: resluts,
  //   })
  // })
})

/*右侧数据*/
router.get("/api/shopList/rightdata", function (req, res, next) {
  connection.query(shopList.selectRightData(), function (err, resluts) {
    if (err) {
      res.send({
        status: 406,
        msg: err,
      })
    }
    res.send({
      status: 200,
      data: resluts,
    })
  })
})

module.exports = router
